Carbon


ThemeIteratorProcPtr

Header: Appearance.h Carbon status: Supported

Performs a custom response to an iteration over themes installed on a system.

typedef Boolean(* ThemeIteratorProcPtr) (
    ConstStr255Param inFileName, 
    SInt16 resID, 
    Collection inThemeSettings, 
    void *inUserData
);

You would declare your function like this if you were to name it MyThemeIteratorCallback:

Boolean MyThemeIteratorCallback (
    ConstStr255Param inFileName, 
    SInt16 resID, 
    Collection inThemeSettings, 
    void *inUserData
);
inFileName

A value of type ConstStr255Param. You are passed the name of the file containing the theme being iterated upon.

resID

A signed 16-bit integer. You are passed the resource ID of the theme.

inThemeSettings

A value of type Collection. You are passed a reference to a collection that contains data describing attributes of the theme. Note that the Appearance Manager owns this collection, and that your application should not dispose of it.

inUserData

A pointer to data of any type. You are passed the value specified in the inUserData parameter of the function IterateThemes.

function result

A value of type Boolean. If you return true, IterateThemes continues iterating. Set to false to terminate the iteration.

DISCUSSION

You should refer to your MyThemeIteratorCallback function using a ThemeIteratorUPP, which you can create using the NewThemeIteratorProc macro.

You typically use the NewThemeIteratorProc macro like this:

ThemeIteratorUPP myThemeIteratorUPP;

myThemeIteratorUPP = NewThemeIteratorProc(MyThemeIteratorCallback);

You typically use the CallThemeIteratorProc macro like this:

CallThemeIteratorProc(myThemeIteratorUPP, inFileName, resID, inThemeSettings, inUserData);

SPECIAL CONSIDERATIONS

Your application should not open and close theme files during this call.

VERSION NOTES

This function is available with Appearance Manager 1.1 and later.

AVAILABILITY

Supported in Carbon.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)